package com.yunang.officialweb.service;

import org.springframework.stereotype.Service;
import com.yunang.officialweb.entity.News;
import com.yunang.officialweb.mapper.NewsMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service

public class NewsService {
    @Autowired
    private NewsMapper newsMapper;
    public News getNews(int id){
        return newsMapper.getNews(id);
    }
    public List<News> selectAll(){
        return newsMapper.selectAll();
    }
}
